import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Login from '../views/Login.vue'
import Register from '../views/Register.vue'
import Address from '../views/Address.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/home',
    name: 'Home',
    component: Home,
	children:[
	
		{
		  path: '/home',
		  name: 'Main',
		  component: () => import( '../views/Main.vue')
		},
		{
		path:'/home/shopcat',
		name:'ShopCat',
		component: () => import( '../views/ShopCat.vue')
	},
  {
    path: '/home/mine',
    name: 'Mine',
    component: () => import( '../views/Mine.vue')
  },
  {
    path: '/home/order',
    name: 'Order',
    component: () => import( '../views/Order.vue')
  }]
  },
  {
    path: '/',
    name: 'Login',
    component: () => import( '../views/Login.vue')
  },
  {
    path: '/register',
    name: 'Register',
    component: () => import( '../views/Register.vue')
  },
  {
    path: '/address',
    name: 'Address',
    component: Address
  },
  {
    path: '/addressadd',
    name: 'AddressAdd',
    component: () => import( '../views/AddressAdd.vue')
  },
  {
	  path: '/addressedit',
	  name: 'AddressEdit',
	  component: () => import( '../views/AddressEdit.vue')
  },
  {
	  path: '/prountadetail',
	  name: 'PrountaDetail',
	  component: () => import( '../views/PrountaDetail.vue')
  },
  {
	  path: '/qrsave',
	  name: 'QrSave',
	  component: () => import( '../views/QrSave.vue')
  },
  {
  	  path: '/zfsuccess',
  	  name: 'ZfSuccess',
  	  component: () => import( '../views/ZfSuccess.vue')
  },
  {
	  path: '/prountadetailkong',
	  name: 'PrountaDetilKong',
	  component: () => import( '../views/PrountaDetilKong.vue')
  },
  {
  	  path: '/qrorder',
  	  name: 'QrOrder',
  	  component: () => import( '../views/QrOrder.vue')
  },
  {
  	  path: '/prountadetailzz',
  	  name: 'PrountaDetilZz',
  	  component: () => import( '../views/PrountaDetilZz.vue')
  },
  {
  	  path: '/sousuo',
  	  name: 'SouSu',
  	  component: () => import( '../views/SouSu.vue')
  },
  {
  	  path: '/sousuodatil',
  	  name: 'SouSuDatil',
  	  component: () => import( '../views/SouSuDatil.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
